package com.ljx.thread.thread06;

import sun.awt.windows.ThemeReader;

/**
 * @author LJX
 * @Description: TODO
 * @Date: 2022/11/1 19:48
 * @Version 1.0
 */
public class Boy implements Runnable{
	private BankCard bankCard;

	public Boy(BankCard bankCard) {
		this.bankCard = bankCard;
	}

	@Override
	public void run() {
		for (int i = 0; i < 2; i++) {

			try {
				bankCard.save(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

		}

	}

